400
How can I display only the month of the date

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Date")
		oTree:Columns():Add("Month"):ComputedField := "month(%0)"
		oItems := oTree:Items()
			oItems:AddItem("01/01/2001 10:00:00")
			oItems:AddItem("02/02/2002 11:00:00")
			oItems:AddItem("03/03/2003 12:00:00")
			oItems:AddItem("04/04/2004 13:00:00")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
399
How can I get only the year part from a date expression

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Date")
		oTree:Columns():Add("Year"):ComputedField := "year(%0)"
		oItems := oTree:Items()
			oItems:AddItem("01/01/2001 10:00:00")
			oItems:AddItem("02/02/2002 11:00:00")
			oItems:AddItem("03/03/2003 12:00:00")
			oItems:AddItem("04/04/2004 13:00:00")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
398
Can I convert the expression to date

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Number")
		oTree:Columns():Add("Date"):ComputedField := "date(dbl(%0))"
		oItems := oTree:Items()
			oItems:AddItem("-1.98")
			oItems:AddItem("30000.99")
			oItems:AddItem("3561.23")
			oItems:AddItem("1232.34")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
397
Can I convert the expression to a number, double or float

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Number")
		oTree:Columns():Add("Number + 2"):ComputedField := "dbl(%0)+2"
		oItems := oTree:Items()
			oItems:AddItem("-1.98")
			oItems:AddItem("0.99")
			oItems:AddItem("1.23")
			oItems:AddItem("2.34")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
396
How can I display dates in long format

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Date")
		oTree:Columns():Add("LongFormat"):ComputedField := "longdate(%0)"
		oItems := oTree:Items()
			oItems:AddItem("01/01/2001 10:00:00")
			oItems:AddItem("02/02/2002 11:00:00")
			oItems:AddItem("03/03/2003 12:00:00")
			oItems:AddItem("04/04/2004 13:00:00")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
395
How can I display dates in short format

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Date")
		oTree:Columns():Add("ShortFormat"):ComputedField := "shortdate(%0)"
		oItems := oTree:Items()
			oItems:AddItem("01/01/2001 10:00:00")
			oItems:AddItem("02/02/2002 11:00:00")
			oItems:AddItem("03/03/2003 12:00:00")
			oItems:AddItem("04/04/2004 13:00:00")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
394
How can I display the time only of a date expression

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Date")
		oTree:Columns():Add("Time"):ComputedField := "'time is:' + time(date(%0))"
		oItems := oTree:Items()
			oItems:AddItem("01/01/2001 10:00:00")
			oItems:AddItem("02/02/2002 11:00:00")
			oItems:AddItem("03/03/2003 12:00:00")
			oItems:AddItem("04/04/2004 13:00:00")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
393
Is there any function to display currencies, or money formatted as in the control panel

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Number")
		oTree:Columns():Add("Currency"):ComputedField := "currency(dbl(%0))"
		oItems := oTree:Items()
			oItems:AddItem("1.23")
			oItems:AddItem("2.34")
			oItems:AddItem("10000.99")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
392
How can I convert the expression to a string so I can look into the date string expression for month's name

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Number")
		oTree:Columns():Add("Str"):ComputedField := "str(%0) + ' AA'"
		oItems := oTree:Items()
			oItems:AddItem("-1.98")
			oItems:AddItem("0.99")
			oItems:AddItem("1.23")
			oItems:AddItem("2.34")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
391
Can I display the absolute value or positive part of the number

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Number")
		oTree:Columns():Add("Abs"):ComputedField := "abs(%0)"
		oItems := oTree:Items()
			oItems:AddItem("-1.98")
			oItems:AddItem("0.99")
			oItems:AddItem("1.23")
			oItems:AddItem("2.34")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
390
Is there any function to get largest number with no fraction part that is not greater than the value

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Number")
		oTree:Columns():Add("Floor"):ComputedField := "floor(%0)"
		oItems := oTree:Items()
			oItems:AddItem("-1.98")
			oItems:AddItem("0.99")
			oItems:AddItem("1.23")
			oItems:AddItem("2.34")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
389
Is there any function to round the values base on the .5 value

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Number")
		oTree:Columns():Add("Round"):ComputedField := "round(%0)"
		oItems := oTree:Items()
			oItems:AddItem("-1.98")
			oItems:AddItem("0.99")
			oItems:AddItem("1.23")
			oItems:AddItem("2.34")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
388
How can I get or display the integer part of the cell

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Number")
		oTree:Columns():Add("Int"):ComputedField := "int(%0)"
		oItems := oTree:Items()
			oItems:AddItem("-1.98")
			oItems:AddItem("0.99")
			oItems:AddItem("1.23")
			oItems:AddItem("2.34")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
387
How can I display names as proper ( first leter of the word must be in uppercase, and the rest in lowercase )

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add(""):ComputedField := "proper(%0)"
		oItems := oTree:Items()
			h := oItems:AddItem("root")
			oItems:InsertItem(h,,"child child")
			oItems:InsertItem(h,,"child child")
			oItems:InsertItem(h,,"child child")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
386
Is there any option to display cells in uppercase

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add(""):ComputedField := "upper(%0)"
		oItems := oTree:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:InsertItem(h,,"Chld 3")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
385
Is there any option to display cells in lowercase

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add(""):ComputedField := "lower(%0)"
		oItems := oTree:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:InsertItem(h,,"Chld 3")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
384
How can I mark the cells that has a specified type, ie strings only

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:ConditionalFormats():Add("type(%0) = 8"):SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oTree:Columns():Add("")
		oItems := oTree:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,2)
			oItems:InsertItem(h,,"Chld 3")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
383
How can I bold the items that contains data or those who displays empty strings

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h,hC

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:ConditionalFormats():Add("not len(%1)=0"):Bold := .T.
		oTree:Columns():Add("C1")
		oTree:Columns():Add("C2")
		oItems := oTree:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			hC := oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("CellCaption",hC,1,"1")
			oItems:InsertItem(h,,"Child 3")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
382
Can I change the background color for items or cells that contains a specified string

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:ConditionalFormats():Add("%0 contains 'hi'"):SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oTree:Columns():Add("")
		oItems := oTree:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:InsertItem(h,,"Chld 3")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
381
Is there any option to change the fore color for cells or items that ends with a specified string

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:ConditionalFormats():Add("%0 endwith '22'"):SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oTree:Columns():Add("")
		oItems := oTree:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 1.22")
			oItems:InsertItem(h,,"Child 2.22")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
380
How can I highlight the cells or items that starts with a specified string

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:ConditionalFormats():Add("%0 startwith 'C'"):Underline := .T.
		oTree:Columns():Add("")
		oItems := oTree:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:InsertItem(h,,"SChild 3")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
379
How can I change the background color or the visual appearance using ebn for a particular column

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oColumns := oTree:Columns()
			oColumns:Add("Column 1")
			oColumns:Add("Column 2"):SetProperty("Def",7/*exHeaderBackColor*/,16777216)
			oColumns:Add("Column 3"):SetProperty("Def",7/*exHeaderBackColor*/,16777471)
			oColumns:Add("Column 4")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
378
How can I change the background color for a particular column

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oColumns := oTree:Columns()
			oColumns:Add("Column 1")
			oColumns:Add("Column 2"):SetProperty("Def",7/*exHeaderBackColor*/,8439039)
			oColumns:Add("Column 3")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
377
How can I display the column's header using multiple lines

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:HeaderHeight := 128
		oTree:HeaderSingleLine := .F.
		oTree:Columns():Add("This is just a column that should break the header."):Width := 32
		oTree:Columns():Add("This is just another column that should break the header.")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
376
How can include the values in the inner cells in the drop down filter window

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oItems
	LOCAL oTree
	LOCAL s

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:DrawGridLines := -2/*exRowLines*/
		oTree:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oTree:SetProperty("Description",1/*exFilterBarBlanks*/,"")
		oTree:SetProperty("Description",2/*exFilterBarNonBlanks*/,"")
		oColumn := oTree:Columns():Add("Single Column")
			oColumn:HTMLCaption := "Single column with <b>inner cells</b>"
			oColumn:ToolTip := "Click the drop down filter button, and the filter list includes the inner cells values too."
			oColumn:DisplayFilterButton := .T.
			oColumn:DisplayFilterPattern := .F.
			oColumn:FilterList := 64/*exIncludeInnerCells*/
		oTree:ShowFocusRect := .F.
		oItems := oTree:Items()
			s := oItems:SplitCell(oItems:AddItem("S 1.1"),0)
			oItems:SetProperty("CellCaption",,s,"S 1.2")
			oItems:SetProperty("CellHAlignment",,s,1/*CenterAlignment*/)
			oItems:SetProperty("CellBackColor",,s,0x1000000)
			oItems:SetProperty("CellWidth",,s,84)
			s := oItems:SplitCell(oItems:AddItem("S 2.1"),0)
			oItems:SetProperty("CellCaption",,s,"S 2.2")
			oItems:SetProperty("CellHAlignment",,s,1/*CenterAlignment*/)
			oItems:SetProperty("CellWidth",,s,84)
			s := oItems:SplitCell(oItems:AddItem("S 3.1"),0)
			oItems:SetProperty("CellCaption",,s,"S 3.2")
			oItems:SetProperty("CellHAlignment",,s,1/*CenterAlignment*/)
			oItems:SetProperty("CellBackColor",,s,0x1000000)
			oItems:SetProperty("CellWidth",,s,84)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
375
How can I sort the value gets listed in the drop down filter window

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn,oColumn1
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:MarkSearchColumn := .F.
		oTree:SetProperty("Description",0/*exFilterBarAll*/,"")
		oTree:SetProperty("Description",1/*exFilterBarBlanks*/,"")
		oTree:SetProperty("Description",2/*exFilterBarNonBlanks*/,"")
		oColumn := oTree:Columns():Add("P1")
			oColumn:DisplayFilterButton := .T.
			oColumn:DisplayFilterPattern := .F.
			oColumn:FilterList := 16/*exSortItemsDesc*/
		oColumn1 := oTree:Columns():Add("P2")
			oColumn1:DisplayFilterButton := .T.
			oColumn1:DisplayFilterPattern := .F.
			oColumn1:FilterList := 32/*exSortItemsAsc*/
		oItems := oTree:Items()
			h := oItems:AddItem("Z3")
			oItems:SetProperty("CellCaption",h,1,"C")
			oItems:SetProperty("CellCaption",oItems:InsertItem(h,,"Z1"),1,"B")
			oItems:SetProperty("CellCaption",oItems:InsertItem(h,,"Z2"),1,"A")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
374
How can I align the text/caption on the scroll bar

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:SetProperty("ScrollPartCaption",1/*exHScroll*/,512/*exLowerBackPart*/,"left")
		oTree:SetProperty("ScrollPartCaptionAlignment",1/*exHScroll*/,512/*exLowerBackPart*/,0/*LeftAlignment*/)
		oTree:SetProperty("ScrollPartCaption",1/*exHScroll*/,128/*exUpperBackPart*/,"right")
		oTree:SetProperty("ScrollPartCaptionAlignment",1/*exHScroll*/,128/*exUpperBackPart*/,2/*RightAlignment*/)
		oTree:ColumnAutoResize := .F.
		oTree:Columns():Add(Transform(1,""))
		oTree:Columns():Add(Transform(2,""))
		oTree:Columns():Add(Transform(3,""))
		oTree:Columns():Add(Transform(4,""))
		oTree:Columns():Add(Transform(5,""))
		oTree:Columns():Add(Transform(6,""))

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
373
How do I select the next row/item
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Column")
		oItems := oTree:Items()
			oItems:AddItem("Item 1")
			oItems:AddItem("Item 2")
			oItems:AddItem("Item 3")
			oItems:SetProperty("SelectItem",oItems:NextVisibleItem(oItems:FocusItem()),.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
372
How do I enable resizing ( changing the height ) the items at runtime

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:ItemsAllowSizing := -1/*exResizeItem*/
		oTree:DrawGridLines := 1/*exHLines*/
		oTree:ScrollBySingleLine := .T.
		oTree:Columns():Add("Column")
		oTree:Items():AddItem("Item 1")
		oItems := oTree:Items()
			oItems:SetProperty("ItemHeight",oItems:AddItem("Item 2"),48)
		oTree:Items():AddItem("Item 3")
		oTree:Items():AddItem("Item 4")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
371
How do I enable resizing all the items at runtime

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:ItemsAllowSizing := 1/*exResizeAllItems*/
		oTree:DrawGridLines := 1/*exHLines*/
		oTree:Columns():Add("Column")
		oTree:Items():AddItem("Item 1")
		oItems := oTree:Items()
			oItems:SetProperty("ItemHeight",oItems:AddItem("Item 2"),48)
		oTree:Items():AddItem("Item 3")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
370
How can I remove the filter
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oColumn := oTree:Columns():Add("Column")
			oColumn:DisplayFilterButton := .T.
			oColumn:FilterType := 1/*exBlanks*/
		oTree:ApplyFilter()
		oTree:ClearFilter()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
369
How do I change the control's border, using your EBN files

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oTree:Appearance := 16777216/*0x1000000+*/

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
368
Can I change the default border of the tooltip, using your EBN files

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:ToolTipDelay := 1
		oTree:ToolTipWidth := 364
		oTree:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oTree:SetProperty("Background",64/*exToolTipAppearance*/,0x1000000)
		oTree:Columns():Add("tootip"):ToolTip := "this is a tooltip assigned to a column"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
367
Can I change the background color for the tooltip

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:ToolTipDelay := 1
		oTree:ToolTipWidth := 364
		oTree:SetProperty("Background",65/*exToolTipBackColor*/,AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oTree:Columns():Add("tootip"):ToolTip := "this is a tooltip assigned to a column"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
366
Does the tooltip support HTML format

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:ToolTipDelay := 1
		oTree:ToolTipWidth := 364
		oTree:Columns():Add("tootip"):ToolTip := "<font Tahoma;11>T</font>his is an HTML <b>tooltip</b> assigned to a <fgcolor=FF0000>column</fgcolor>"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
365
Can I change the forecolor for the tooltip

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:ToolTipDelay := 1
		oTree:ToolTipWidth := 364
		oTree:SetProperty("Background",66/*exToolTipForeColor*/,AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oTree:Columns():Add("tootip"):ToolTip := "this is a tooltip assigned to a column"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
364
Can I change the foreground color for the tooltip

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:ToolTipDelay := 1
		oTree:ToolTipWidth := 364
		oTree:Columns():Add("tootip"):ToolTip := "<fgcolor=FF0000>this is a tooltip assigned to a column</fgcolor>"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
363
How can I merge cells

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:DrawGridLines := -1/*exAllLines*/
		oTree:MarkSearchColumn := .F.
		oTree:Columns():Add("C1")
		oTree:Columns():Add("C2")
		oTree:Columns():Add("C3")
		oItems := oTree:Items()
			h := oItems:AddItem("this cell merges the first two columns")
			oItems:SetProperty("CellMerge",h,0,1)
			h := oItems:AddItem()
			oItems:SetProperty("CellCaption",h,1,"this cell merges the last two columns")
			oItems:SetProperty("CellMerge",h,1,2)
			h := oItems:AddItem("this cell merges the all three columns")
			oItems:SetProperty("CellMerge",h,0,1)
			oItems:SetProperty("CellMerge",h,0,2)
			h := oItems:AddItem("this draws a divider item")
			oItems:SetProperty("ItemDivider",h,0)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
362
How can I merge cells

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:MarkSearchColumn := .F.
		oTree:TreeColumnIndex := -1
		oTree:Columns():Add("C1")
		oTree:Columns():Add("C2")
		oItems := oTree:Items()
			h := oItems:AddItem("Cell 1")
			oItems:SetProperty("CellCaption",h,1,"This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.")
			oItems:SetProperty("CellSingleLine",h,1,0/*exCaptionWordWrap*/)
			h := oItems:AddItem("This is bit of text merges all cells in the item")
			oItems:SetProperty("ItemDivider",h,0)
			oItems:SetProperty("CellHAlignment",h,0,1/*CenterAlignment*/)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
361
How can I specify the width for a splited cell

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h,s,s1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:DrawGridLines := -2/*exRowLines*/
		oTree:Columns():Add("Single Column")
		oItems := oTree:Items()
			h := oItems:AddItem("Split 1")
			s := oItems:SplitCell(h,0)
			oItems:SetProperty("CellWidth",,s,64)
			oItems:SetProperty("CellCaption",,s,"Split 2")
			s1 := oItems:SplitCell(,s)
			oItems:SetProperty("CellCaption",,s1,"Split 3")
			oItems:SetProperty("CellWidth",,s1,64)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
360
How can I split a cell in three parts

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h,s,s1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:DrawGridLines := -2/*exRowLines*/
		oTree:Columns():Add("Single Column")
		oItems := oTree:Items()
			h := oItems:AddItem("Split 1")
			s := oItems:SplitCell(h,0)
			oItems:SetProperty("CellCaption",,s,"Split 2")
			s1 := oItems:SplitCell(,s)
			oItems:SetProperty("CellCaption",,s1,"Split 3")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
359
How can I add a button aligned to right

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL s

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oTree:Columns():Add("Single Column")
		oTree:ShowFocusRect := .F.
		oItems := oTree:Items()
			oItems:SetProperty("ItemDivider",oItems:AddItem("This is a bit of text being displayed on the entire item"),0)
			s := oItems:SplitCell(oItems:AddItem("Split Cell 1.1"),0)
			oItems:SetProperty("CellCaption",,s,"Split Cell <img>1</img>")
			oItems:SetProperty("CellCaptionFormat",,s,1/*exHTML*/)
			oItems:SetProperty("CellHAlignment",,s,1/*CenterAlignment*/)
			oItems:SetProperty("CellHasButton",,s,.T.)
			oItems:SetProperty("CellWidth",,s,84)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
358
How can I split a cell

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL s

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:DrawGridLines := -2/*exRowLines*/
		oTree:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oTree:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oTree:Columns():Add("Single Column")
		oTree:ShowFocusRect := .F.
		oItems := oTree:Items()
			s := oItems:SplitCell(oItems:AddItem("Split Cell 1.1"),0)
			oItems:SetProperty("CellCaption",,s,"Split Cell <img>1</img>")
			oItems:SetProperty("CellCaptionFormat",,s,1/*exHTML*/)
			oItems:SetProperty("CellHAlignment",,s,1/*CenterAlignment*/)
			oItems:SetProperty("CellBackColor",,s,0x1000000)
			oItems:SetProperty("CellWidth",,s,84)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
357
Can I select an item giving its general position

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SelectPos := 1

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
356
How can I change the color for separator / dividers items

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:SetProperty("GridLineColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oTree:MarkSearchColumn := .F.
		oTree:TreeColumnIndex := -1
		oTree:ScrollBySingleLine := .F.
		oTree:Columns():Add("C1")
		oTree:Columns():Add("C2")
		oItems := oTree:Items()
			h := oItems:AddItem("Cell 1")
			oItems:SetProperty("CellCaption",h,1,"This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.")
			oItems:SetProperty("CellSingleLine",h,1,0/*exCaptionWordWrap*/)
			h := oItems:AddItem()
			oItems:SetProperty("ItemDivider",h,0)
			oItems:SetProperty("ItemDividerLine",h,4/*DoubleDotLine*/)
			oItems:SetProperty("ItemDividerLineAlignment",h,1/*DividerCenter*/)
			oItems:SetProperty("ItemHeight",h,6)
			oItems:SetProperty("SelectableItem",h,.F.)
			h := oItems:AddItem("Cell 2")
			oItems:SetProperty("CellCaption",h,1,"This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.")
			oItems:SetProperty("CellSingleLine",h,1,0/*exCaptionWordWrap*/)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
355
How can I add separator - dividers items

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:MarkSearchColumn := .F.
		oTree:TreeColumnIndex := -1
		oTree:ScrollBySingleLine := .F.
		oTree:Columns():Add("C1")
		oTree:Columns():Add("C2")
		oItems := oTree:Items()
			h := oItems:AddItem("Cell 1")
			oItems:SetProperty("CellCaption",h,1,"This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.")
			oItems:SetProperty("CellSingleLine",h,1,0/*exCaptionWordWrap*/)
			h := oItems:AddItem()
			oItems:SetProperty("ItemDivider",h,0)
			oItems:SetProperty("ItemDividerLine",h,4/*DoubleDotLine*/)
			oItems:SetProperty("ItemDividerLineAlignment",h,1/*DividerCenter*/)
			oItems:SetProperty("ItemHeight",h,6)
			oItems:SetProperty("SelectableItem",h,.F.)
			h := oItems:AddItem("Cell 2")
			oItems:SetProperty("CellCaption",h,1,"This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.")
			oItems:SetProperty("CellSingleLine",h,1,0/*exCaptionWordWrap*/)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
354
Can I change the style of the line being displayed by a divider item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:MarkSearchColumn := .F.
		oTree:TreeColumnIndex := -1
		oTree:ScrollBySingleLine := .F.
		oTree:Columns():Add("C1")
		oTree:Columns():Add("C2")
		oItems := oTree:Items()
			h := oItems:AddItem("Cell 1")
			oItems:SetProperty("CellCaption",h,1,"This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.")
			oItems:SetProperty("CellSingleLine",h,1,0/*exCaptionWordWrap*/)
			h := oItems:AddItem("This is bit of text that's displayed on the entire item, divider.")
			oItems:SetProperty("ItemDivider",h,0)
			oItems:SetProperty("ItemDividerLine",h,4/*DoubleDotLine*/)
			oItems:SetProperty("CellHAlignment",h,0,1/*CenterAlignment*/)
			oItems:SetProperty("ItemHeight",h,24)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
353
Can I remove the line being displayed by a divider item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:MarkSearchColumn := .F.
		oTree:TreeColumnIndex := -1
		oTree:Columns():Add("C1")
		oTree:Columns():Add("C2")
		oItems := oTree:Items()
			h := oItems:AddItem("Cell 1")
			oItems:SetProperty("CellCaption",h,1,"This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.")
			oItems:SetProperty("CellSingleLine",h,1,0/*exCaptionWordWrap*/)
			h := oItems:AddItem("This is bit of text that's displayed on the entire item, divider.")
			oItems:SetProperty("ItemDivider",h,0)
			oItems:SetProperty("ItemDividerLine",h,0/*EmptyLine*/)
			oItems:SetProperty("CellHAlignment",h,0,1/*CenterAlignment*/)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
352
How can I display a divider item, merging all cells

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:MarkSearchColumn := .F.
		oTree:TreeColumnIndex := -1
		oTree:Columns():Add("C1")
		oTree:Columns():Add("C2")
		oItems := oTree:Items()
			h := oItems:AddItem("Cell 1")
			oItems:SetProperty("CellCaption",h,1,"This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.")
			oItems:SetProperty("CellSingleLine",h,1,0/*exCaptionWordWrap*/)
			h := oItems:AddItem("This is bit of text that's displayed on the entire item, divider.")
			oItems:SetProperty("ItemDivider",h,0)
			oItems:SetProperty("CellHAlignment",h,0,1/*CenterAlignment*/)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
351
How can I fix or lock items

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			oItems:SetProperty("LockedItemCount",0/*TopAlignment*/,1)
			oItems:SetProperty("CellCaption",oItems:LockedItem(0/*TopAlignment*/,0),0,"This is a locked item, fixed to the top side of the control.")
			oItems:SetProperty("ItemBackColor",oItems:LockedItem(0/*TopAlignment*/,0),AutomationTranslateColor( GraMakeRGBColor  ( { 196,196,186 } )  , .F. ))
			oItems:SetProperty("LockedItemCount",2/*BottomAlignment*/,2)
			oItems:SetProperty("CellCaption",oItems:LockedItem(2/*BottomAlignment*/,0),0,"This is a locked item, fixed to the top side of the control.")
			oItems:SetProperty("ItemBackColor",oItems:LockedItem(2/*BottomAlignment*/,0),AutomationTranslateColor( GraMakeRGBColor  ( { 196,196,186 } )  , .F. ))
			oItems:SetProperty("CellCaption",oItems:LockedItem(2/*BottomAlignment*/,1),0,"This is a locked item, fixed to the top side of the control.")
			oItems:SetProperty("ItemBackColor",oItems:LockedItem(2/*BottomAlignment*/,1),AutomationTranslateColor( GraMakeRGBColor  ( { 186,186,186 } )  , .F. ))

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
350
How can I fix or lock an item on the bottom side of the control

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			oItems:SetProperty("LockedItemCount",2/*BottomAlignment*/,1)
			oItems:SetProperty("CellCaption",oItems:LockedItem(2/*BottomAlignment*/,0),0,"This is a locked item, fixed to the bottom side of the control.")
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
349
How can I fix or lock an item on the top of the control

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			oItems:SetProperty("LockedItemCount",0/*TopAlignment*/,1)
			oItems:SetProperty("CellCaption",oItems:LockedItem(0/*TopAlignment*/,0),0,"This is a locked item, fixed to the top side of the control.")
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
348
Is there any function to limit the height of the items when I display it using multiple lines

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:ScrollBySingleLine := .T.
		oTree:Columns():Add("C1")
		oTree:Columns():Add("C2")
		oItems := oTree:Items()
			h := oItems:AddItem("Cell 1")
			oItems:SetProperty("CellCaption",h,1,"This is bit of text that's shown on multiple lines. This is bit of text that's shown on multiple lines.")
			oItems:SetProperty("CellSingleLine",h,1,0/*exCaptionWordWrap*/)
			oItems:SetProperty("ItemMaxHeight",h,48)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
347
Why I cannot center my cells in the column

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:TreeColumnIndex := -1
		oTree:DrawGridLines := -2/*exRowLines*/
		oTree:Columns():Add("Default"):Alignment := 1/*CenterAlignment*/
		oTree:Items():AddItem("item 1")
		oTree:Items():AddItem("item 2")
		oTree:Items():AddItem("item 3")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
346
How can I align the cell to the left, center or to the right

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:TreeColumnIndex := -1
		oTree:DrawGridLines := -2/*exRowLines*/
		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			oItems:SetProperty("CellHAlignment",oItems:AddItem("left"),0,0/*LeftAlignment*/)
			oItems:SetProperty("CellHAlignment",oItems:AddItem("center"),0,1/*CenterAlignment*/)
			oItems:SetProperty("CellHAlignment",oItems:AddItem("right"),0,2/*RightAlignment*/)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
345
How do I apply HTML format to a cell

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:TreeColumnIndex := -1
		oTree:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oTree:SetProperty("HTMLPicture","p1","c:\exontrol\images\zipdisk.gif")
		oTree:SetProperty("HTMLPicture","p2","c:\exontrol\images\auction.gif")
		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			h := oItems:AddItem("The following item shows some of the HTML format supported:")
			oItems:SetProperty("CellHAlignment",h,0,1/*CenterAlignment*/)
			h := oItems:AddItem("<br>text icons <img>1</img>, <img>2</img>, ... pictures <img>p1</img>, <img>p2</img> <br><br>text <b>bold</b>, <i>italic</i>, <u>underline</u>, <s>strikeout</s>, ...<br><dotline>and so on...<br> <a>anchor</a> or <a2>hyperlink</a><br><fgcolor=FF0000>fgcolor</fgcolor> or <bgcolor=00FF00>bgcolor</bgcolor> ")
			oItems:SetProperty("CellCaptionFormat",h,0,1/*exHTML*/)
			oItems:SetProperty("CellSingleLine",h,0,0/*exCaptionWordWrap*/)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
344
How can I change the font for a cell

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Default")
		oTree:Items():AddItem("std font")
		oItems := oTree:Items()
			oItems:SetProperty("CellCaptionFormat",oItems:AddItem("this <font tahoma;12>is a bit of text with</font> a different font"),0,1/*exHTML*/)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
343
How can I change the font for a cell

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL f

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Default")
		oTree:Items():AddItem("default font")
		f := CreateObject("StdFont")
			f:Name := "Tahoma"
			f:Size := 12
		oItems := oTree:Items()
			oItems:SetProperty("CellFont",oItems:AddItem("new font"),0,f)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
342
How can I change the font for entire item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL f

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Default")
		oTree:Items():AddItem("default font")
		f := CreateObject("StdFont")
			f:Name := "Tahoma"
			f:Size := 12
		oItems := oTree:Items()
			oItems:SetProperty("ItemFont",oItems:AddItem("new font"),f)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
341
How do I vertically align a cell

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:DrawGridLines := -2/*exRowLines*/
		oTree:Columns():Add("MultipleLine"):SetProperty("Def",16/*exCellSingleLine*/,.F.)
		oTree:Columns():Add("VAlign")
		oItems := oTree:Items()
			h := oItems:AddItem("This is a bit of long text that should break the line")
			oItems:SetProperty("CellCaption",h,1,"top")
			oItems:SetProperty("CellVAlignment",h,1,0/*TopAlignment*/)
			h := oItems:AddItem("This is a bit of long text that should break the line")
			oItems:SetProperty("CellCaption",h,1,"middle")
			oItems:SetProperty("CellVAlignment",h,1,1/*MiddleAlignment*/)
			h := oItems:AddItem("This is a bit of long text that should break the line")
			oItems:SetProperty("CellCaption",h,1,"bottom")
			oItems:SetProperty("CellVAlignment",h,1,2/*BottomAlignment*/)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
340
How can I change the position of an item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			oItems:AddItem("Item 1")
			oItems:AddItem("Item 2")
			oItems:SetProperty("ItemPosition",oItems:AddItem("Item 3"),0)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
339
How do I find an item based on a path

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:SetProperty("ItemData",oItems:InsertItem(h,,"Child 2"),1234)
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SetProperty("ItemBold",oItems:FindPath("Root 1\Child 1"),.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
338
How do I find an item based on my extra data

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:SetProperty("ItemData",oItems:InsertItem(h,,"Child 2"),1234)
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SetProperty("ItemBold",oItems:FindItemData(1234),.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
337
How do I find an item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SetProperty("ItemBold",oItems:FindItem("Child 2",0),.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
336
How can I insert a hyperlink or an anchor element

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems,oItems1
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Column")
		oItems := oTree:Items()
			oItems:SetProperty("CellCaptionFormat",oItems:AddItem("Just an <a1>anchor</a> element ..."),0,1/*exHTML*/)
		oItems1 := oTree:Items()
			oItems1:SetProperty("CellCaptionFormat",oItems1:AddItem("Just another <a2>anchor</a> element ..."),0,1/*exHTML*/)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
335
How do I find the index of the item based on its handle

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SetProperty("ItemBold",oItems:ItemByIndex(oItems:ItemToIndex(h)),.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
334
How do I find the handle of the item based on its index

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SetProperty("ItemBold",oItems:ItemByIndex(1),.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
333
How can I find the cell being clicked in a radio group

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:MarkSearchColumn := .F.
		oTree:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,128 } )  , .F. ))
		oTree:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
		oTree:Columns():Add("C1")
		oTree:Columns():Add("C2")
		oTree:Columns():Add("C3")
		oItems := oTree:Items()
			h := oItems:AddItem("Cell 1")
			oItems:SetProperty("CellCaption",h,1,"Radio 1")
			oItems:SetProperty("CellHasRadioButton",h,1,.T.)
			oItems:SetProperty("CellRadioGroup",h,1,1234)
			oItems:SetProperty("CellCaption",h,2,"Radio 2")
			oItems:SetProperty("CellHasRadioButton",h,2,.T.)
			oItems:SetProperty("CellRadioGroup",h,2,1234)
			oItems:SetProperty("CellState",h,1,1)
			oItems:SetProperty("CellBold",,oItems:CellChecked(1234),.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
332
Can I add a +/- ( expand / collapse ) buttons to each item, so I can load the child items later

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			oItems:SetProperty("ItemHasChildren",oItems:AddItem("parent item with no child items"),.T.)
			oItems:AddItem("next item")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
331
Can I let the user to resize at runtime the specified item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:ScrollBySingleLine := .T.
		oTree:DrawGridLines := -2/*exRowLines*/
		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			oItems:SetProperty("ItemAllowSizing",oItems:AddItem("resizable item"),.T.)
			oItems:AddItem("not resizable item")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
330
How can I change the size ( width, height ) of the picture

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:SetProperty("CellPicture",h,0,oTree:ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)"))
			oItems:SetProperty("CellPictureWidth",h,0,24)
			oItems:SetProperty("CellPictureHeight",h,0,24)
			oItems:SetProperty("ItemHeight",h,32)
			h := oItems:AddItem("Root 2")
			oItems:SetProperty("CellPicture",h,0,oTree:ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)"))
			oItems:SetProperty("ItemHeight",h,48)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
329
How can I find the number or the count of selected items

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:SingleSel := .F.
		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SetProperty("SelectItem",oItems:ItemChild(h),.T.)
			oItems:SetProperty("SelectItem",oItems:NextSiblingItem(oItems:ItemChild(h)),.T.)
			oItems:AddItem(oItems:SelectCount())

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
328
How do I unselect an item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SetProperty("SelectItem",h,.F.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
327
How do I find the selected item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SetProperty("SelectItem",h,.T.)
			oItems:SetProperty("ItemBold",oItems:SelectedItem(0),.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
326
How do I un select all items
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:SingleSel := .F.
		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:UnselectAll()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
325
How do I select multiple items

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:SingleSel := .F.
		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SetProperty("SelectItem",oItems:ItemChild(h),.T.)
			oItems:SetProperty("SelectItem",oItems:NextSiblingItem(oItems:ItemChild(h)),.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
324
How do I select all items

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:SingleSel := .F.
		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SelectAll()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
323
How do I select an item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SetProperty("SelectItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
322
Can I display a button with some picture or icon inside

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:SetProperty("HTMLPicture","p1","c:\exontrol\images\zipdisk.gif")
		oTree:Columns():Add("C1")
		oTree:Columns():Add("C2")
		oItems := oTree:Items()
			h := oItems:AddItem("Cell 1")
			oItems:SetProperty("CellCaption",h,1," Button <img>p1</img> ")
			oItems:SetProperty("CellCaptionFormat",h,1,1/*exHTML*/)
			oItems:SetProperty("CellHAlignment",h,1,2/*RightAlignment*/)
			oItems:SetProperty("CellHasButton",h,1,.T.)
			oItems:SetProperty("CellButtonAutoWidth",h,1,.T.)
			oItems:SetProperty("ItemHeight",h,48)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
321
Can I display a button with some picture or icon inside

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oTree:Columns():Add("C1")
		oTree:Columns():Add("C2")
		oItems := oTree:Items()
			h := oItems:AddItem("Cell 1")
			oItems:SetProperty("CellCaption",h,1," Button <img>1</img> ")
			oItems:SetProperty("CellCaptionFormat",h,1,1/*exHTML*/)
			oItems:SetProperty("CellHAlignment",h,1,2/*RightAlignment*/)
			oItems:SetProperty("CellHasButton",h,1,.T.)
			oItems:SetProperty("CellButtonAutoWidth",h,1,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
320
Can I display a button with some icon inside

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oTree:Columns():Add("C1")
		oTree:Columns():Add("C2")
		oItems := oTree:Items()
			h := oItems:AddItem("Cell 1")
			oItems:SetProperty("CellCaption",h,1," <img>1</img> ")
			oItems:SetProperty("CellCaptionFormat",h,1,1/*exHTML*/)
			oItems:SetProperty("CellHAlignment",h,1,2/*RightAlignment*/)
			oItems:SetProperty("CellHasButton",h,1,.T.)
			oItems:SetProperty("CellButtonAutoWidth",h,1,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
319
How can I assign multiple icon/picture to a cell

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:SetProperty("HTMLPicture","p1","c:\exontrol\images\zipdisk.gif")
		oTree:SetProperty("HTMLPicture","p2","c:\exontrol\images\auction.gif")
		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			h := oItems:AddItem("text <img>p1</img> another picture <img>p2</img> and so on")
			oItems:SetProperty("CellCaptionFormat",h,0,1/*exHTML*/)
			oItems:SetProperty("CellPicture",h,0,oTree:ExecuteTemplate("loadpicture(`c:\exontrol\images\colorize.gif`)"))
			oItems:SetProperty("ItemHeight",h,48)
			oItems:AddItem("Root 2")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
318
How can I assign an icon/picture to a cell

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:SetProperty("CellPicture",h,0,oTree:ExecuteTemplate("loadpicture(`c:\exontrol\images\zipdisk.gif`)"))
			oItems:SetProperty("ItemHeight",h,48)
			oItems:AddItem("Root 2")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
317
How can I assign multiple icons/pictures to a cell

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			h := oItems:AddItem("Root <img>1</img> 1, <img>2</img>, ... and so on ")
			oItems:SetProperty("CellCaptionFormat",h,0,1/*exHTML*/)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
316
How can I assign multiple icons/pictures to a cell

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:SetProperty("CellImages",h,0,"1,2,3")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
315
How can I assign an icon/picture to a cell

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:SetProperty("CellImage",h,0,1)
			oItems:SetProperty("CellImage",oItems:InsertItem(h,,"Child 1"),0,2)
			oItems:SetProperty("CellImage",oItems:InsertItem(h,,"Child 2"),0,3)
			oItems:SetProperty("ExpandItem",h,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
314
How can I get the handle of an item based on the handle of the cell

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SetProperty("ItemBold",oItems:CellItem(oItems:ItemCell(h,0)),.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
313
How can I display a button inside the item or cell

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("C1")
		oTree:Columns():Add("C2")
		oItems := oTree:Items()
			h := oItems:AddItem("Cell 1")
			oItems:SetProperty("CellCaption",h,1," Button 1 ")
			oItems:SetProperty("CellHAlignment",h,1,2/*RightAlignment*/)
			oItems:SetProperty("CellHasButton",h,1,.T.)
			oItems:SetProperty("CellButtonAutoWidth",h,1,.T.)
			h := oItems:AddItem("Cell 2")
			oItems:SetProperty("CellCaption",h,1," Button 2 ")
			oItems:SetProperty("CellHAlignment",h,1,1/*CenterAlignment*/)
			oItems:SetProperty("CellHasButton",h,1,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
312
How can I change the state of a radio button

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:MarkSearchColumn := .F.
		oTree:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,128 } )  , .F. ))
		oTree:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
		oTree:Columns():Add("C1")
		oTree:Columns():Add("C2")
		oTree:Columns():Add("C3")
		oItems := oTree:Items()
			h := oItems:AddItem("Cell 1")
			oItems:SetProperty("CellCaption",h,1,"Radio 1")
			oItems:SetProperty("CellHasRadioButton",h,1,.T.)
			oItems:SetProperty("CellRadioGroup",h,1,1234)
			oItems:SetProperty("CellCaption",h,2,"Radio 2")
			oItems:SetProperty("CellHasRadioButton",h,2,.T.)
			oItems:SetProperty("CellRadioGroup",h,2,1234)
			oItems:SetProperty("CellState",h,1,1)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
311
How can I assign a radio button to a cell

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:MarkSearchColumn := .F.
		oTree:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,128 } )  , .F. ))
		oTree:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
		oTree:Columns():Add("C1")
		oTree:Columns():Add("C2")
		oTree:Columns():Add("C3")
		oItems := oTree:Items()
			h := oItems:AddItem("Cell 1")
			oItems:SetProperty("CellCaption",h,1,"Radio 1")
			oItems:SetProperty("CellHasRadioButton",h,1,.T.)
			oItems:SetProperty("CellRadioGroup",h,1,1234)
			oItems:SetProperty("CellCaption",h,2,"Radio 2")
			oItems:SetProperty("CellHasRadioButton",h,2,.T.)
			oItems:SetProperty("CellRadioGroup",h,2,1234)
			oItems:SetProperty("CellState",h,1,1)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
310
How can I change the state of a checkbox

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("C1")
		oTree:Columns():Add("C2")
		oItems := oTree:Items()
			h := oItems:AddItem("Cell 1")
			oItems:SetProperty("CellCaption",h,1,"Check Box")
			oItems:SetProperty("CellHasCheckBox",h,1,.T.)
			oItems:SetProperty("CellState",h,1,1)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
309
How can I assign a checkbox to a cell

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("C1")
		oTree:Columns():Add("C2")
		oItems := oTree:Items()
			h := oItems:AddItem("Cell 1")
			oItems:SetProperty("CellCaption",h,1,"Check Box")
			oItems:SetProperty("CellHasCheckBox",h,1,.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
308
How can I display an item or a cell on multiple lines

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:ScrollBySingleLine := .T.
		oTree:Columns():Add("C1")
		oTree:Columns():Add("C2")
		oItems := oTree:Items()
			h := oItems:AddItem("Cell 1")
			oItems:SetProperty("CellCaption",h,1,"This is bit of text that's shown on multiple lines")
			oItems:SetProperty("CellSingleLine",h,1,0/*exCaptionWordWrap*/)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
307
How can I assign a tooltip to a cell

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("C1")
		oTree:Columns():Add("C2")
		oItems := oTree:Items()
			h := oItems:AddItem("Cell 1")
			oItems:SetProperty("CellCaption",h,1,"tooltip")
			oItems:SetProperty("CellToolTip",h,1,"This is bit of text that's shown when the user hovers the cell")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
306
How can I associate an extra data to a cell
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("C1")
		oTree:Columns():Add("C2")
		oItems := oTree:Items()
			h := oItems:AddItem("Cell 1")
			oItems:SetProperty("CellCaption",h,1,"Cell 2")
			oItems:SetProperty("CellData",h,1,"your extra data")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
305
How do I enable or disable a cell

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("C1")
		oTree:Columns():Add("C2")
		oItems := oTree:Items()
			h := oItems:AddItem("Cell 1")
			oItems:SetProperty("CellCaption",h,1,"Cell 2")
			oItems:SetProperty("CellEnabled",h,1,.F.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
304
How do I change the cell's foreground color

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("C1")
		oTree:Columns():Add("C2")
		oItems := oTree:Items()
			h := oItems:AddItem("Cell 1")
			oItems:SetProperty("CellCaption",h,1,"Cell 2")
			oItems:SetProperty("CellForeColor",h,1,AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
303
How do I change the visual effect for the cell, using your EBN files

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oTree:Columns():Add("C1")
		oTree:Columns():Add("C2")
		oItems := oTree:Items()
			h := oItems:AddItem("Cell 1")
			oItems:SetProperty("CellCaption",h,1,"Cell 2")
			oItems:SetProperty("CellBackColor",h,1,0x1000000)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
302
How do I change the cell's background color

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("C1")
		oTree:Columns():Add("C2")
		oItems := oTree:Items()
			h := oItems:AddItem("Cell 1")
			oItems:SetProperty("CellCaption",h,1,"Cell 2")
			oItems:SetProperty("CellBackColor",h,1,AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
301
How do I change the caption or value for a particular cell

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oItems
	LOCAL oTree

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("C1")
		oTree:Columns():Add("C2")
		oItems := oTree:Items()
			oItems:SetProperty("CellCaption",oItems:AddItem("Cell 1"),1,"Cell 2")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN